Method and apparatus for real-time detection of a scene

ABSTRACT

A method for real-time detection of at least one scene by an apparatus, from among a set of possible reference scenes, includes acquiring current values of attributes from measurement values supplied by sensors. The method further includes traversing a path through a decision tree. The nodes of the decision tree are respectively associated with the attributes. The traversal considers at each node along the path, the current value of the corresponding attribute, so as to obtain at the output of the path, a scene from among the set of reference scenes. The obtained scene identifying which reference scene is the detected scene. The method further includes developing a confidence index (SC) associated with the identification of the detected scene.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to French Patent Application No.1752947, filed on Apr. 5, 2017, which application is hereby incorporatedherein by reference.

TECHNICAL FIELD

The present invention generally relates to the real-time detection of ascene by an apparatus, such as a wireless communication apparatus, e.g.,an intelligent mobile cellular phone (smartphone) or a digital tablet,equipped with at least one sensor, e.g., an accelerometer.

BACKGROUND

A scene is understood in a very broad sense as notably encompassing ascene characteristic of the environment in which the apparatus islocated, whether the apparatus is carried by a user capable of movement,e.g., a mobile cellular phone, (scene of the “bus”, “train”,“restaurant”, “office”, etc. type), or the apparatus is a fixed object,whether connected or not connected (a radiator, for example, in a homeautomation application), the scene characteristic of the environmentpossibly being, for example, of the “wet room”, “dry room”, “day”,“night”, “shutters closed”, “shutters open”, etc. type.

A scene may also encompass a scene characteristic of an activitypracticed by the bearer of the apparatus, e.g., a smart watch. Then,such a scene could be, for example, “walking”, “running”, etc.

As to wireless communication apparatuses, some types of smartphones ortablets today are capable of scene detection, making it possible todetermine the environment in which the phone or tablet user is located.This may thus make it possible for a third party, e.g., an advertiser ora cultural organization to send relevant information connected with theplace where the user of the apparatus is located.

Thus, for example, if the user is located at a given tourist site, theymay be sent restaurant addresses in the vicinity of the place where theyare located. Similarly, they may also be sent information relating tocertain historic buildings which are located in the vicinity of theplace where they are located.

Scene detection is notably understood to mean a discrimination of thescene in which the wireless communication apparatus is located. Severalknown solutions exist for detecting (discriminating) a scene. Thesesolutions use, for example, one or more dedicated sensors generallyassociated with a specific algorithm.

These sensors may be environmental measurement sensors, i.e., notablyany type of sensor capable of supplying information on the environmentin which the wireless communication apparatus is located. For example,spatiotemporal characteristics of the environment of the apparatus,e.g., the temporally frozen or not frozen character of the environment,the speed of evolution of spatiotemporal change in the environment(based on detecting the movement of the apparatus) or in the sound,spatial, or visual characteristics of this environment, e.g., the noiselevel of the environment, or the altitude or the brightness level of theenvironment. Examples of sensors capable of supplying information on theenvironment include barometers, proximity sensors, optical sensors, etc.

These sensors may be used to give an indication of the spatialorientation of the apparatus, e.g., the gyroscope, so as to rotate thedisplay on the screen of the apparatus. In a context where the apparatusis constantly powered up (Always-On) and where the battery life is animportant criterion, these environmental sensors can be used for scenedetection.

For a multimodal approach, the apparatus may use an algorithmimplementing a binary decision tree on the basis of descriptors orattributes resulting from particular processing (e.g., filtering) on theraw data from the sensors. These attributes may be, for example, means,energy values, variances, etc.

Algorithms implementing a decision tree known to the person skilled inthe art are described in the article by Syed Amir Hoseini-Tabatabaei andothers entitled “A survey on Smartphone Based Systems for OpportunisticUser Context Recognition”, Centre for Communication Systems Research,University of Surrey, ACM computing surveys, 29 Jun. 2013, or to thearticle by Ricco Rakotomalala entitled “Arbres de Décision” (DecisionTrees), Revue MODULAD, 2005, number 33, pages 163-187.

A decision tree comprises nodes interconnected by branches ending inleaves. Each node is associated with a test on an attribute, and eachleaf corresponds to a reference scene belonging to a corpus or set ofreference scenes capable of being detected by the apparatus at the endof the tree traversal. There may be multiple nodes in the treeassociated with the same test on the same attribute. The nodes areconnected by the branches. The choice of a branch from among thosestarting from a node depends on the value of the attribute in this node,and therefore the result of the test in this node. A decision tree isconstructed for a corpus of scenes given by a conventional learningalgorithm. One advantage of scene detection by a decision tree lies inthe speed of execution.

SUMMARY

Embodiments of the invention can improve the reliability of theclassification obtained at the output of a decision tree implementedwithin an apparatus, whether connected or not connected, for example,but not restrictively a wireless communication apparatus, a smart watch,or a motionless object.

According to an implementation and embodiment, provision is made toselect the most appropriate attributes for discriminating a corpus ofgiven scenes, the term “scene” being taken in a very broad sense asmentioned above.

According to one aspect, a method is provided for real-time detection ofat least one scene by an apparatus, notably a wireless communicationapparatus, e.g., a mobile cellular phone or a digital tablet, from amonga set of possible reference scenes. Embodiments of the invention aredescribed with respect to wireless communication apparatuses. It isunderstood, however, that the invention may apply to any type ofapparatus and to any type of scene.

The method, according to this aspect, comprises an acquisition ofcurrent values of attributes from measurement values supplied by sensorsand a traversal of a path within a decision tree. The nodes of thedecision tree are associated with tests on these attributes. The currentvalue of the corresponding attribute is taken into account at each nodeof the path. At the output of the path, a scene is obtained from amongthe set of reference scenes. The detected scene is formed from theobtained scene.

The method further includes a development of a confidence indexassociated with the detected scene. The confidence index improves thereliability of the detection, by delivering the actual detection (harddecision) accompanied by its confidence index (soft decision). Thisdelivery makes it possible for a decision to be taken about a detectedscene having, for example, a low confidence index. The decision dependson the intended application, and may include, for example, not takinginto account this scene and taking into account the previously detectedscene.

According to one implementation making it possible for a confidenceindex to be quickly and simply developed, this development is performedafter the detection of the detected scene, and based on the knowledge ofthis detected scene. In particular, this development is performed bypassing along an additional traversal of the path with the knowledge ateach node of the detected scene. Moreover, the development of theconfidence index may include an additional traversal of the path of thedecision tree with the same current values of attributes. The additionaltraversal comprises, at each node of the path, taking into account afirst probability that the corresponding attribute has the currentvalue, knowing the detected scene. The additional traversal furthercomprises, for each reference scene different from the detected scene,taking into account a second probability that the correspondingattribute has the current value, knowing this reference scene. Aninitial confidence index is determined from all the first and secondprobabilities taken into account along the traversed path, and thedevelopment of the confidence index is performed from this initialconfidence index.

Taking into account the first and second probabilities may comprise, forexample, calculating in real time these probabilities from histograms,or more simply, reading in a memory of these probabilities, which havebeen pre-calculated. The confidence index may be the initial confidenceindex or the normalized confidence index involving the length of thepath. In practice, the first and second probabilities may be read in amemory.

According to a possible variant, determining the initial confidenceindex includes determining, for each node of the path, the mean of thesecond probabilities associated with this node and the logarithm of aratio between the first probability associated with this node and themean, and a sum over all the nodes of the path of the logarithms.

According to another possible variant, determining the initialconfidence index includes determining, for each node of the path, themean of the second probabilities associated with this node and thelogarithm of a ratio between the first probability associated with thisnode and the mean, and a sum over all the nodes of the path of thelogarithms respectively weighted by weighting coefficients chosen togive more weight to the logarithms associated with the first nodes ofthe path. For example, each weighting coefficient is positive and may beless than or greater than 1, as the case may be. Thus, for an initialcoefficient greater than 1, typically between 1 and 2, the weightingcoefficient associated with a current node may be taken as equal to thesquare root of the weighting coefficient associated with the precedingnode. As a variant, the weighting coefficient associated with a currentnode of rank i may be taken as equal to α^(i) where α is a positivecoefficient and less than 1.

According to another possible variant, determining the initialconfidence index includes determining, for each node of the path, themaximum of the second probabilities associated with this node and thelogarithm of a ratio between the first probability associated with thisnode and the maximum, and a sum over all the nodes of the path of thelogarithms. The confidence index may be considered as a score the valuesof which may generally be greater than one. Consequently, the method mayfurther include a conversion of the confidence index into a confidenceprobability using a predetermined conversion function.

In some embodiments, some attributes may not be relevant for detectingsome scenes. In other words, some attributes do not actually allow aparticular reference scene to be discriminated. Consequently, the mostrelevant attributes may be selected for a corpus of reference scenes.

Thus, according to one embodiment, the method also includes apreliminary phase of determining the attributes, taking into account theset of possible reference scenes. This preliminary phase may beperformed regardless of the detection method defined above. Thus,according to another aspect, a method of selection is provided forselecting reference attributes usable in a classifier configured fordetecting a reference scene set or corpus. This classifier may be anytype of classifier or a decision tree.

The preliminary phase or the method of selection may include adevelopment for each reference attribute of a set of possible referenceattributes, a merit factor representative of the ability of thereference attribute to discriminate the different reference scenes, anda selection of the attributes of the classifier or the decision treefrom among the reference attributes according to their merit factor.

According to one embodiment, the selection includes, for each referenceattribute, a comparison of the value of its merit factor with athreshold, and a selection as attributes, of the reference attributeshaving a value of merit factor below the threshold.

As a variant, it would be possible to classify the reference attributesby ascending order of their merit factor and to select as attributes aset number of reference attributes, e.g., the R first referenceattributes thus classified.

According to one embodiment, the development of the merit factor of areference attribute includes a development of intermediate parametersrespectively relating to pairs of reference scenes, and a mean of allthe intermediate parameters. The development of each intermediateparameter relates to a pair of reference scenes comprising a calculationof the canonical scalar product between a first distribution ofprobabilities of the values of the reference attribute, knowing a firstreference scene of the pair, and a second distribution of probabilitiesof the values of the reference attribute, knowing a second referencescene of the pair. In order to limit the range of values on which thecanonical scalar products may be produced, each first distribution ofprobabilities and each second distribution of probabilities may resultfrom a filtering of the values of the considered attribute for theconsidered reference scene.

The sensors may be chosen, for example, from the group formed by anaccelerometer, a gyroscope, a magnetometer, an audio sensor, abarometer, a proximity sensor, and an optical sensor.

According to another aspect, an apparatus is provided, e.g. a wirelesscommunication apparatus. The apparatus includes sensors, a detector, anacquisition circuit, a controller, and a processor. The sensors areconfigured for supplying measurement values. The detector is configuredfor real-time detection of at least one scene from among a set or corpusof possible reference scenes. The detector comprises a memory storing asoftware module forming a decision tree. The nodes of the decision treeare respectively associated with tests on attributes and the outputs ofthe decision tree correspond to the possible reference scenes. Theacquisition circuit is configured for acquiring current values of theattributes. The controller is configured for activating the execution ofthe software module with the current values of the attributes, so as totraverse a path within the decision tree and obtain at the output of thepath a scene from among the set of reference scenes. The obtained sceneforms the detected scene. The processor is configured for developing aconfidence index associated with the detected scene.

According to one embodiment, the processor is configured for developingthe confidence index once the scene has been detected and based on theknowledge of this detected scene.

According to another embodiment, the controller is configured foractivating the software module a second time with the current values ofthe attributes and making it traverse the path a second time. Theprocessor includes a first processing module configured for, at eachnode of the path, taking into account a first probability that thecorresponding attribute has the current value, knowing the detectedscene. For each reference scene different from the detected scene, theprocessing module is configured to take into account a secondprobability that the corresponding attribute has the current valueknowing this reference scene. The processor further includes a secondprocessing module configured for determining an initial confidence indexfrom all the first and second probabilities taken into account along thetraversed path, and a third processing module configured for performingthe development of the confidence index from this initial confidenceindex.

According to one embodiment, the memory contains the first and secondprobabilities, and the first module is configured for reading the firstand second probabilities in the memory.

According to one embodiment, the second processing module is configuredfor determining for each node of the path, the mean of the secondprobabilities associated with this node, and the logarithm of a ratiobetween the first probability associated with this node and the mean.The second processing module is further configured for summing saidlogarithms over all the nodes of the path.

As a variant, the second processing module is configured for determiningfor each node of the path, the mean of the second probabilitiesassociated with this node and the logarithm of a ratio between the firstprobability associated with this node and the mean. The secondprocessing module is further configured for summing said logarithms overall the nodes of the path respectively weighted by weightingcoefficients chosen to give more weight to the logarithms associatedwith the first nodes of the path.

The weighting coefficient is, for example, positive and less than orgreater than 1. The weighting coefficient associated with a current nodemay be equal to the square root of the weighting coefficient associatedwith the preceding node, the initial coefficient being greater than 1.As a variant, the weighting coefficient associated with a current nodeof rank i may be equal to α^(i) where α is a positive coefficient andless than 1.

According to another possible embodiment, the second processing moduleis configured for determining, for each node of the path, the maximum ofthe second probabilities associated with this node and the logarithm ofa ratio between the first probability associated with this node and themaximum. The second processing module is further configured for summingthe logarithms over all the nodes of the path.

The processor may include a third module configured for normalizing theinitial confidence index involving the length of the path. The apparatusmay further include a converter configured for converting the confidenceindex into a confidence probability using a conversion function storedin the memory. The sensors may be chosen from the group formed by anaccelerometer, a gyroscope, a magnetometer, an audio sensor, abarometer, a proximity sensor, an optical sensor, a temperature,humidity, or brightness sensor.

The list and attributes of the foregoing features of the embodiments andvariants is, however, not exhaustive.

The apparatus may be, for example, a mobile cellular phone or a digitaltablet, or any type of smart object, especially a smart watch,optionally connected to an Internet network.

BRIEF DESCRIPTION OF THE DRAWINGS

Other advantages and features of the invention will appear onexamination of the detailed description of implementations andembodiments, in no way restrictive, and the attached drawings in which:FIGS. 1 to 9 schematically illustrate various implementations andembodiments of the invention.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

In FIG. 1, the reference, APP, designates an electronic apparatus thatwill be considered to be in this non-restrictive example, a wirelesscommunication apparatus provided with an antenna ANT. This apparatus maybe a mobile cellular phone such as a smartphone or a digital tablet.

The apparatus APP here comprises multiple measurement sensors,CPT1-CPTj, j=1 to M.

As a guide, the sensors CPTj may be chosen from the group formed by anaccelerometer, a gyroscope, a magnetometer, an audio sensor such as amicrophone, a barometer, a proximity sensor, and an optical sensor.

Of course, the apparatus may be provided with multiple accelerometersand/or multiple gyroscopes and/or multiple magnetometers and/or multipleaudio sensors and/or a barometer, and/or one or more proximity sensors,and/or one or more optical sensors.

Audio sensors are useful environment descriptors. Indeed, if theapparatus is not moving, then the audio sensor may be useful fordetecting the nature of this environment. Of course, according to theapplications, either environmental sensors of the accelerometer or evengyroscope or magnetometer type may be used, or audio sensors or acombination of these two types of sensors, such as non-inertial sensorsof the temperature, humidity or brightness type.

These environmental measurement sensors, may, in particular in amultimodal approach, in combination with a conventional discriminationalgorithm ALC, e.g. of the decision tree type, intended to work, forexample, on filtered raw data from these sensors, form detector MDETconfigured for detecting a scene. Detector MDET may thus, for example,detect whether the apparatus APP is located in this or that environment(restaurant, moving vehicle, etc.) or if the bearer of this apparatus(e.g., a smart watch) is performing a specific activity (walking,running, cycling, etc.).

It is now assumed as a non-restrictive example that all theenvironmental sensors, CPT1-CPTM, help in the detection of the scene andsupply the discrimination algorithm ALC with data at measurementinstants for making it possible to detect the scene.

The discrimination algorithm implemented in software in the detectorMDET here is a decision tree that has undergone a learning phase on anenvironmental sensor measurement database. Such a decision tree isparticularly simple to implement and only requires a few kilobytes ofmemory and a working frequency of less than 0.01 MHz.

It is stored in a program memory MM1.

As will be seen in more detail below, and as is conventional in thematter, the decision tree ALC operates on an attribute vector A_(i). Thetree includes a series of nodes. Each node is assigned to a test on anattribute.

Two branches emerge from a node.

The choice between the two branches depends on the current value of theattribute associated with this node and therefore the result of theassociated test.

Moreover, the output of the tree comprises leaves corresponding toreference scenes that the apparatus APP is designed to detect.

These reference scenes may be, for example, without this beingrestrictive, “BUS”, “OFFICE”, “RESTAURANT”, “TRAIN” scenesrepresentative, for example, of the environment in which the apparatusAPP is located, here the phone.

The detector MDET also comprises an acquisition circuit ACQ configuredfor acquiring current values of the attributes from the measurement datafrom the sensors.

In general, an attribute may be an item of raw data from a sensor or anitem of filtered raw data, or yet another variable, e.g., a data meanover a certain time interval, a variance, etc.

As will be seen in more detail below, the detector is configured forreal-time detection of at least one scene from among the set or corpusof possible reference scenes.

In this respect, the detector MDET comprises a controller MCM configuredfor activating the software module ALC with the current values of theattributes so as to traverse a path within the decision tree and obtainat the output of the path a scene from among the reference scene set,this obtained scene forming the detected scene.

Moreover, the apparatus also comprises processor MTR configured fordeveloping a confidence index associated with the detected scene.

And, as will be seen in more detail below, the processor MTR isconfigured for developing the confidence index once the scene has beendetected and based on the knowledge of this detected scene.

This confidence index will notably be developed from a set ofprobabilities contained in a memory MM2 of the detector MDET.

The apparatus APP also comprises a block BLC capable of cooperating withthe detector MDET for processing the detected scene and transmitting theinformation via the antenna ANT of the apparatus. Of course, the antennais optional if the apparatus is not a connected apparatus.

The apparatus also comprises controller MCTRL configured forsuccessively activating the detector MDET so as to implement asuccession of steps of scene detection spaced apart by time intervals.

These various components, BLC, MDET, MCTRL and MTR are, for example,implemented by software modules within the processor PR of the apparatusAPP.

Reference will now be made more particularly to FIG. 2, and followingfor illustrating an example of confidence index associated with adetected scene.

In FIG. 2, it is assumed that the acquisition circuit ACQ has delivered,from the M sensors, CPTj, j=1 to M, an attribute vector A_(i) havingcurrent values.

The number of attributes A_(i) is totally independent of the number ofsensors.

The controller MCM then activates the software module ALC forming thedecision tree with said current values of the attributes A_(i) so as totraverse a path PTH within this decision tree and obtain at the outputof the path a detected scene S_(d) from among the corpus of referencescenes S_(k).

A test is assigned in the path PTH on an attribute A_(i) at each nodeND_(i). This test is, for example, the operator “less than”, or “lessthan or equal to”, or “greater than”, or “greater than or equal to”, or“equal to”.

Once this scene S_(d) is detected, the controller MCM is configured foractivating the decision tree ALC a second time with said current valuesof the attributes A_(i) and making it traverse said path PTH a secondtime.

The processor MTR include a first processing module MT1 configured, ateach node ND_(i) of the path, for determining a first probability, P(A_(i)|S_(d)), that the corresponding attribute A_(i) is the currentvalue, knowing the detected scene S_(d).

Moreover, this first processing module, for each reference scene S_(k)different from the detected scene, S_(d) (k=0 to N−1, if it is assumedthat there are N reference scenes), will determine a second probability,P (A_(i)|S_(k)), that the corresponding attribute A_(i) has the currentvalue knowing this reference scene S_(k).

In fact, as will be explained in more detail below, these differentfirst and second probabilities are already stored in the memory MM2since they have been calculated during an initial phase using histogramsfor the different possible values of attributes.

Determining these probabilities therefore comes down here to a simplereading in memory.

The second processing module MT2 of the processor MTR will thendetermine an initial confidence index from all the first and secondprobabilities.

Finally, a third processing module MT3 may be configured for developingthe confidence index from this initial confidence index.

More precisely, this confidence index SC may be the initial confidenceindex or, for example, the normalized initial confidence index via thelength of the path PTH. By way of example, the confidence index SCassociated with the detected scene S_(d) may be determined by Formula(I).

$\begin{matrix}{{SC} = {\sum_{i \in {PTH}}{\log\left( \frac{P\left( {A_{i}❘S_{d}} \right)}{\frac{1}{N - 1} \cdot {\sum\limits_{{k = 0},\;{\neq d}}^{N - 1}{P\left( {A_{i}❘S_{k}} \right)}}} \right)}}} & (I)\end{matrix}$

In this Formula (I), “log” designates the base 10 logarithm function.However, the use of a natural logarithm is possible.

As a variant, the confidence index SC may be determined by Formula (II)in which “max” designates the maximum.

$\begin{matrix}{{SC} = {\sum_{i \in {PTH}}{\log\left( \frac{P\left( {A_{i}❘S_{d}} \right)}{\max\limits_{k \neq d}\left( {P\left( {A_{i}❘S_{k}} \right)} \right)} \right)}}} & ({II})\end{matrix}$

As a variant, it would be possible to determine the confidence index SCfrom Formula (III) given in which the coefficients w_(i) are weightingcoefficients chosen to give more weight to the logarithms associatedwith the first nodes of the path PTH.

$\begin{matrix}{{SC} = {\sum_{i \in {PTH}}{w_{i}{\log\left( \frac{P\left( {A_{i}❘S_{d}} \right)}{\frac{1}{N - 1} \cdot {\sum\limits_{{k = 0},\;{\neq d}}^{N - 1}{P\left( {A_{i}❘S_{k}} \right)}}} \right)}}}} & ({III})\end{matrix}$

Each weighting coefficient w_(i) is, for example, positive.

Thus, the weighting coefficient w_(i) associated with a current node NDimay be equal to the square root of the weighting coefficient w_(i-1)associated with the preceding node if the initial coefficient is greaterthan 1.

The first weighting coefficient may, for example, be equal to 1.6.

As a variant, the weighting coefficient associated with a current nodeof rank i may be taken as equal to α_(i) where α is a positivecoefficient and less than 1, e.g. equal to 0.9.

The weighting is then exponentially decreasing.

The SC score forms a confidence index associated with the detected sceneS_(d).

Indeed, the lower the value of the score (the greater the absolute valueof the value for negative values or the lower the absolute value of thevalue for positive values), the lower the confidence, i.e., thereliability, of detection. In other words, there is a strong chance thatthe detected scene does not correspond to the scene in which theapparatus is actually located. Conversely, the higher the score, thehigher the confidence, i.e., the reliability, of scene detection, i.e.there is a strong chance that the detected scene is actually the correctone.

As a guide, the values of the score may, for example, vary between −20and +20.

However, the processor MTR may further comprise a converter MCV, forexample, also implemented in software form configured for converting theconfidence index SC into a confidence probability using a conversionfunction stored in the memory MM2, for example.

One example of such a conversion function FCT is, for example,illustrated in FIG. 3.

In the illustrated example, the function FCT has a form of a sigmoid andcomprises scores between −8 and +8 in the abscissa.

More details will be given below regarding an example of determiningsuch a transfer function FCT.

Reference will now be made more particularly to FIG. 4 for illustratingan example of determining probabilities that the attributes have givencurrent values knowing a detected scene.

More precisely, for each scene S_(k) of the corpus of reference scenes,for each attribute A_(j), a number of measurements will be performed,e.g. 100,000 measurements, with different types of apparatus APPprovided with different sensors one of which supplies the consideredattribute, all of these apparatuses being placed in a conditioncorresponding to the reference scene at different places on the planet.

For example, if the scene S_(k) is a “BUS” scene the differentapparatuses will be placed in BUSes and the different values will bestudied of the attribute A_(j) supplied by the corresponding sensor orsensors with which the different apparatuses APP are provided.

The MS measurements (MS=100,000, for example) having supplied for theattribute A_(j), MS current values, make it possible to determine ahistogram for these values (step 30). From this histogram, knowing thenumber MS and the number of times that a current value belongs to agiven time interval (corresponding to a given granularity), it istherefore possible to determine (step 31) the probability, P(A_(j)|S_(k)), that the attribute A_(j) has this current value knowingthe scene S_(k).

These operations are repeated for all the attributes A_(j) and for allthe reference scenes S_(k) belonging to the reference scene corpus andthe set of probabilities is then stored (step 32) in the memory MM2.

The first processing module, at each node NDi of the path PTH of thedecision tree, may therefore easily read the probability that theconsidered attribute has the current value associated with this nodeknowing the detected scene S_(d), and also read the probability that theconsidered attribute has the current value associated with this nodeknowing a scene S_(k) different from the scene S_(d).

Reference will now be made more particularly to FIG. 5 for describing anexample of obtaining the transfer function FCT making it possible toconvert the scores SC into confidence probability.

It is assumed in this example that all the scores SC vary between −8 and+8 and a granularity is defined equal, for example, to 0.5.

In other words, any score value greater than or equal to q and less thanq+0.5 will be assigned an arbitrary score value SCq equal to q.

Moreover, a first counter CPT1 q and a second counter CPT2 q will beassigned to each value SCq, the meaning of which will be returned to inmore detail below.

It was seen previously that a number of measurements were performed fordetermining the different probabilities of the attribute values knowingparticular scenes.

Accordingly it is assumed here that a number, e.g. 100,000, of attributevectors have been obtained corresponding to the different referencescenes of the scene corpus.

Among these 100,000 attributes, there may be, for example, a firstnumber corresponding to a first reference scene, a second numbercorresponding to a second reference scene and so on.

As illustrated in FIG. 5, as a guide but not restrictively, all theattribute vectors may be examined corresponding to a given referencescene S_(k), then all the attribute vectors corresponding to anotherreference scene may be examined and so on.

Of course, as a variant, it would be possible to examine these attributevectors in another order even if it means interleaving them.

In the present case, the decision tree ALC is traversed (step 40) with afirst attribute vector corresponding to the reference scene S_(k) andthus a score SCq is obtained that could be calculated according to oneof Formulae (I), (II) or (III) previously indicated.

In step 41 it is then examined whether the scene that was detected atthe output from the tree ALC actually corresponds to the scene S_(k).

If such is the case, the counter CPT1 q is incremented (step 42).

Otherwise, the counter CPT2 q is incremented (step 43).

Then, these operations 40, 41, 42 and 43 are repeated for each otherattribute vector associated with the reference scene S_(k).

When all the attribute vectors have been examined (step 44) the nextreference scene is considered and the operations, 40, 41, 42, 43, 44 arerepeated, until all the reference scenes have been examined (step 45).

Once all the reference scenes have been examined, i.e., all theattribute vectors have been considered, it is then possible to determinefor each score, SCq, the confidence probability PbSCq equal to the ratiobetween the value of the counter CPT1 q and the sum of the values of thetwo counters, CPT1 q and CPT2 q (step 46).

The probability values between the different discrete values PbSCq maythen be obtained, for example, by an interpolation, in particular alinear interpolation.

In some embodiments, some attributes are not necessarily relevant fordiscriminating reference scenes.

This is true for any type of classifier, in particular a decision tree,and everything that follows applies to any type of classifier, inparticular to a decision tree.

For the purposes of simplifying the text, only the decision tree will bementioned in the rest of this description.

It is particularly useful when constructing a decision tree, to takeinto account only the most statistically relevant attributes from awhole list of possible attributes.

This makes it possible to reduce the size of the decision tree, andaccordingly the memory size needed for its implementation whilesimplifying this implementation.

An example of preliminary determining 60 of attributes A_(i) isillustrated in FIGS. 6 to 9.

More precisely, the preliminary phase 60 for determining attributescomprises a development 600, for each reference attribute A_(r) of a setof possible reference attributes, a merit factor, γ(A_(r)),representative of the ability of the reference attribute to discriminatethe different reference scenes, and a selection 601 of said attributesA_(i) of the decision tree from among the reference attributes A_(r)according to their merit factor.

And, as illustrated in FIG. 7, this selection includes for eachreference attribute A_(r) a comparison of the value of its merit factor,γ(A_(r)), with a threshold TH.

Then the attributes A_(r) having a merit factor below the threshold areselected as attributes A_(i).

As illustrated in FIG. 8, the development of the merit factor, γ(A_(r)),of a reference attribute, includes a development of intermediateparameters relating to pairs of reference scenes S_(x), S_(y).

The development of each intermediate parameter relating to a pair ofreference scenes S_(x), S_(y) comprises a calculation 6000 of thecanonical scalar product between a first distribution D_(rx) ofprobabilities of the values of the reference attribute knowing a firstreference scene S_(x) and a second distribution D_(ry) of probabilitiesof the values of the reference attribute knowing a second referencescene S_(y).

D_(rx) is equal to P (A_(r)|S_(x)) and D_(ry) is equal to P(A_(r)|S_(y)).

This scalar product, S_(xy)(A_(r)), is defined by Formula (IV).S _(xy)(A _(r))=

D _(rx) ,D _(ry)

  (IV)

In this formula, the scalar product of two discrete functions having ncomponents is defined as being the sum of the n elementary products ofthe homologous components of the two functions.

The intermediate parameter relating to a scene pair S_(x), S_(y) isequal to S_(xy)(A_(r))/(S_(xx) (A_(r))·S_(yy)(A_(r)))^(1/2).

Then, the mean, mean_(x,y), of all the intermediate parameters iscalculated (step 600 i) (Formula V) for all the pairs of referencescenes S_(x), S_(y).

$\begin{matrix}{{\gamma\left( A_{r} \right)} = {{mean}_{x,y}\left( \frac{S_{xy}\left( A_{r} \right)}{\sqrt{{s_{xx}\left( A_{r} \right)}{S_{yy}\left( A_{r} \right)}}} \right)}} & (V)\end{matrix}$

It is, moreover, preferable, but not essential, that each firstdistribution of probabilities D_(ix) and each second distribution ofprobabilities D_(iy) results from a filtering 90 (FIG. 9) of the valuesof the considered attribute A_(i) for the considered reference sceneS_(j).

More precisely, for each attribute A_(i) and for each scene S_(j) theparameters, min_(i,j)=min(A_(i)|S_(j)), and max_(i,j)=max(A_(i)|S_(j)),are calculated. The min and max respectively designate the minimum andmaximum values of the values of the attribute A_(i) knowing the sceneS_(j).

Then, the values outside the interval [max (min_(i,j),μ_(i,j)−3σ_(i,j)). . . min(max_(ij),μ_(i,j)+3σ_(i,j))] are eliminated.

In this interval, μ_(i,j) and σ_(i,j) are respectively defined byFormulae (VI) and (VII) as follows. In Formula (VI) “mean” is the “mean”operator.

$\begin{matrix}{\mu_{i,j} = {{{mean}\left( {A_{i}❘S_{j}} \right)} = {\frac{1}{N_{i,j}}{\sum\limits_{k = 0}^{N_{i,{j - 1}}}A_{i,k}}}}} & ({VI}) \\{\sigma_{i,j} = \sqrt{\left( {\frac{1}{N_{i,j}}{\sum\limits_{k = 0}^{N_{i,j} - 1}A_{i,k}^{2}}} \right) - \mu_{i,j}^{2}}} & ({VII})\end{matrix}$

In Formulae (VI) and (VII), A_(i,k) represents the value of theattribute i of the vector k. This vector belongs to a scene j.

In Formula (VI) summing is done using all the vectors of the databaseassociated with a scene j in order to calculate the mean value of theattribute i for the scene j.

Formula (VII) makes it possible to determine the standard deviationassociated with this mean value.

Of course, the aforementioned interval is only a non-restrictive exampleof possible interval.

As mentioned before, although this preliminary phase 60 for determiningthe most relevant attributes has been described in relation to adecision tree, this preliminary determining of attributes may be appliedto any classification algorithm, e.g. neural networks, or algorithmsknown to the person skilled in the art under the term “Support VectorMachines” or “Gaussian Mixture Model”.

What is claimed is:
 1. A method of analyzing a scene, the method comprising: identifying the scene as a detected scene from among a set of reference scenes according to a current value of each attribute of a plurality of attributes, the scene encompassing a scene characteristic of an environment in which an apparatus is located, wherein the apparatus is carried by a user capable of movement or a fixed object, wherein the scene characteristic of the environment comprises movement of the apparatus, noise level of the environment, altitude of the environment, or brightness level of the environment, and wherein the plurality of attributes are associated with the set of reference scenes; developing a confidence index of an identification of the scene as the detected scene, according to a knowledge of the detected scene; and outputting the identification of the detected scene and the confidence index associated with the identification; wherein identifying the scene comprises: for each attribute of the plurality of attributes, using a sensor to acquire the current value of the attribute in the scene from a measurement by the sensor of the attribute from the scene; traversing a path through a decision tree for a first time according to the current value of each attribute of the plurality of attributes, wherein the decision tree comprises a plurality of nodes, and wherein each node of the plurality of nodes is associated with a test on a value of an attribute associated with the node, and the traversing includes considering at each node along the path, the current value of the attribute corresponding to the node; and obtaining, as an output of the path, an identification of which reference scene is a detected scene from the set of reference scenes, according to the current value of each attribute in the plurality of attributes measured from the scene.
 2. The method according to claim 1, wherein developing the confidence index comprises: acquiring a knowledge of the detected scene in response to the identifying the detected scene; and developing the confidence index according to the knowledge of the detected scene.
 3. The method according to claim 1, wherein developing the confidence index comprises traversing the path for a second time, in response to identifying the detected scene, by using the same current value of each attribute used when traversing the path for the first time; and wherein traversing the path for the second time comprises performing the following at each node along the path: determining a first probability that the current value of an attribute corresponding to the node is identifiable with the detected scene, according to a knowledge of the detected scene; determining a second probability that the current value of the attribute corresponding to the node is identifiable with a reference scene different from the detected scene, according to a knowledge of the reference scene; and developing an initial confidence index in response to traversing the path for the second time, according to the first probability and the second probability determined at each node along the path.
 4. The method according to claim 3, wherein determining the initial confidence index comprises: for each node along the path, determining a mean of the second probability associated with the node, and a logarithm of a ratio between the first probability associated with the node and the mean; and adding together the logarithm for each node along the path to determine a sum of a plurality of logarithms across a plurality of nodes along the path.
 5. The method according to claim 4, wherein determining the initial confidence index further comprises determining, for each node along the path, a weighted logarithm by weighting the logarithm associated with the node with a weighting coefficient, wherein the logarithm associated with a preceding node is weighted more than the logarithm associated with a subsequent node along the path; and wherein adding together the logarithm for each node along the path comprises adding together the weighted logarithm for each node along the path to determine a sum of a plurality of weighted logarithms across the plurality of nodes along the path.
 6. The method according to claim 5, wherein each weighting coefficient is a positive number.
 7. The method according to claim 6, wherein, when a first weighting coefficient, for a logarithm associated with a first node along the path, is greater than one, determining the weighted logarithm includes: setting, for a logarithm associated with each subsequent node in the plurality of nodes along the path that follow the first node, a weighting coefficient at a value that is equal to a square root of a weighting coefficient for a logarithm associated with a preceding node.
 8. The method according to claim 6, wherein determining the weighted logarithm includes setting, for a logarithm associated with a node of rank i in the plurality of nodes along the path, a weighting coefficient at a value that is equal to αi, wherein α is a positive number that is less than
 1. 9. The method according to claim 3, wherein determining, at each node, the second probability comprises determining, at the node, a plurality of second probabilities, wherein each second probability is associated with another reference scene in the set of reference scenes different from the detected scene; and wherein the determining the initial confidence index comprises: determining, for each node of the path, a maximum of the plurality of second probabilities associated with the node, and a logarithm of a ratio between the first probability associated with this node and the maximum; and adding together the logarithm for each node along the path to determine a sum of a plurality of logarithms across the plurality of nodes of the path.
 10. The method according to claim 3, wherein the determining the initial confidence index comprises normalizing the initial confidence index by a length of the path.
 11. The method according to claim 1, wherein further comprising converting the confidence index into a confidence probability according to a predetermined conversion function.
 12. The method according to claim 1, further comprising determining the plurality of attributes according to the set of reference scenes, before the identifying the detected scene.
 13. The method according to claim 12, wherein determining the plurality of attributes comprises: identifying a set of reference attributes; developing, for each reference attribute, a merit factor according to an ability of the reference attribute to discriminate between reference scenes in the set of reference scenes; and selecting the plurality of attributes for the decision tree from among the set of reference attributes in accordance with the merit factor for each reference attribute.
 14. The method according to claim 13, wherein the selecting comprises, for each reference attribute: comparing with a threshold, a value of the merit factor that is associated with the reference attribute; and selecting the reference attribute for the plurality of attributes when the value of the merit factor is below the threshold.
 15. The method according to claim 13, wherein developing, for each reference attribute, the merit factor comprises: developing a plurality of intermediate parameters relating to the reference attribute, wherein each intermediate parameter in the plurality of intermediate parameters is associated with a pair of a first reference scene and a second reference scene from the set of reference scenes, and wherein the pair is one of a plurality of pairs of reference scenes that are each different from one another; and determining a mean of the plurality of intermediate parameters for the reference attribute; wherein developing the plurality of intermediate parameters comprises calculating, for each intermediate parameter, a canonical scalar product between a first distribution of probabilities of a plurality of values of the reference attribute, knowing the first reference scene in the pair associated with the intermediate parameter, and a second distribution of probabilities of the plurality of values of the reference attribute, knowing the second reference scene in the pair associated with the intermediate parameter.
 16. The method according to claim 15, wherein calculating, for each intermediate parameter, the canonical scalar product comprises obtaining the first distribution of probabilities and the second distribution of probabilities from a filtering of values of the reference attribute for each reference scene.
 17. The method according to claim 1, wherein the sensor comprises an accelerometer, a gyroscope, a magnetometer, an audio sensor, a barometer, a proximity sensor, an optical sensor, a temperature sensor, a humidity sensor, or a brightness sensor.
 18. An apparatus, comprising: a processor; a sensor coupled to the processor, wherein the sensor is configured to measure a current value of each attribute of a plurality of attributes for a scene encompassing a scene characteristic of an environment in which the apparatus is located, wherein the apparatus is carried by a user capable of movement or a fixed object, wherein the scene characteristic of the environment comprises movement of the apparatus, noise level of the environment, altitude of the environment, or brightness level of the environment; a non-transitory memory coupled to the processor, wherein a plurality of instructions are stored in the non-transitory memory that, when executed by the processor, cause the apparatus to: identify the scene as a detected scene from among a set of reference scenes; develop a confidence index associated with a knowledge of the detected scene from identifying the detected scene; and output the identification of the detected scene and the confidence index associated with the identification; wherein the plurality of instructions that, when executed by the processor, cause the apparatus to identify the scene as the detected scene, comprises instructions to: acquire, for each attribute of the plurality of attributes, the current value of the attribute measured by the sensor; perform a first traversal of a path within a decision tree according to the current value of each attribute of the plurality of attributes, wherein the decision tree comprises a plurality of nodes, and wherein each node of the plurality of nodes is associated with a test on a value of an attribute associated with the node, and the path is selected along a set of nodes, according to an outcome of each test of a current value of an attribute associated with each node along the path; and obtain, at an output of the path, from among a set of a plurality of reference scenes, a reference scene consistent with the scene, according to the plurality of attributes; wherein the detected scene comprises the reference scene that is consistent with the scene according to the plurality of attributes.
 19. The apparatus according to claim 18, wherein the plurality of instructions that, when executed by the processor, cause the apparatus to develop the confidence index comprises instructions to: perform a second traversal of the path of the decision tree in response to identifying the detected scene, by, at each node: determining a first probability that the current value of an attribute corresponding to the node is identifiable with the detected scene, according to a knowledge of the detected scene; determining a second probability that the current value of the attribute corresponding to the node is identifiable with a reference scene different from the detected scene, according to a knowledge of the reference scene; and writing the first probability and the second probability into the non-transitory memory; read the first probability and the second probability for each node that is written in the non-transitory memory; and determine an initial confidence index according to the first probability and the second probability for each node that is read in the non-transitory memory.
 20. The apparatus according to claim 18, wherein the sensor comprises an accelerometer, a gyroscope, a magnetometer, an audio sensor, a barometer, a proximity sensor, an optical sensor, a temperature sensor, a humidity sensor, or a brightness sensor.
 21. The apparatus according to claim 18, wherein the apparatus is disposed in an end user device that comprises cellular phone, a digital tablet or a smart watch; wherein the scene is a current scene characteristic of an environment where the end user device is located, or of an activity engaging an end user bearing the end user device; and wherein the end user device receives an output of an identification of the detected scene and the confidence index from the apparatus, and performs, according to the output, an execution of a program or a provision of a service.
 22. A scene classifier, comprising: a sensor configured to measure a value for an attribute of a scene, the scene encompassing a scene characteristic of an environment in which an apparatus including the sensor is located, wherein the apparatus is carried by a user capable of movement or a fixed object, wherein the scene characteristic of the environment comprises movement of the apparatus, noise level of the environment, altitude of the environment, or brightness level of the environment, and wherein the attribute is one of a plurality of attributes associated with the scene; a computing device coupled to the sensor, wherein the computing device includes a non-transitory medium storing a plurality of software modules executable by the computing device; and a controller coupled to the sensor and the computing device; wherein the plurality of software modules comprise: a decision tree module configured to form a decision tree with a plurality of nodes, wherein the plurality of nodes provide a plurality of paths through the decision tree, with each node associated with a test on a value of an attribute of the plurality of attributes that are associated with a set of reference scenes, in accordance with a knowledge of the set of reference scenes; a detecting module configured to: traverse a path through the decision tree, for a first time, by testing, at each node along the path, a current value of the attribute associated with the node that is measured by the sensor from the scene; and detect at a first output of the path, which reference scene is identifiable with the scene, wherein the reference scene that is identifiable comprises a detected scene, with each remaining reference scene in the set of reference scenes comprising another reference scene; and a soft decision module configured to develop a confidence index associated with the first output of the path, based upon a knowledge of the detected scene and of the other reference scenes in the set after traversing the path for the first time; wherein the controller is configured to activate the detecting module to traverse the path for the first time in response to a supply of measurements by the sensor for each attribute in the plurality of attributes.
 23. The scene classifier according to claim 22, wherein the controller is further configured to activate the detecting module to traverse for a second time, a same path as the path traversed the first time, in response to the first output of the path from the detecting module, with a current value of each attribute of the plurality of attributes being the value measured by the sensor for the attribute used in traversing the path for the first time; and wherein the soft decision module is configured to develop the confidence index according to a traversal of the path for the first time and the second time, by being configured to: determine, at each node along the path, for the test of the attribute associated with the node, a first probability of the scene being the detected scene, according to a knowledge of the attribute in the detected scene, and a second probability of the scene being the other reference scene, according to a knowledge of the attribute in the other reference scene; obtain an initial confidence index according to a plurality of first probabilities and a plurality of second probabilities determined across the plurality of nodes along the path, in response to traversing the path for the first time and the second time; and develop the confidence index from the initial confidence index.
 24. A method of analyzing a scene, the method comprising: identifying the scene as a detected scene from among a set of reference scenes, according to a current value of each attribute of a plurality of attributes, wherein the plurality of attributes are associated with the set of reference scenes; developing a confidence index of an identification of the scene as the detected scene, according to a knowledge of the detected scene; outputting the identification of the detected scene and the confidence index associated with the identification; wherein identifying the scene comprises for each attribute of the plurality of attributes, using a sensor to acquire the current value of the attribute in the scene from a measurement by the sensor of the attribute from the scene, traversing a path through a decision tree for a first time according to the current value of each attribute of the plurality of attributes, wherein the decision tree comprises a plurality of nodes, and wherein each node of the plurality of nodes is associated with a test on a value of an attribute associated with the node, and the traversing includes considering at each node along the path, the current value of the attribute corresponding to the node, and obtaining, as an output of the path, an identification of which reference scene is a detected scene from the set of reference scenes, according to the current value of each attribute in the plurality of attributes measured from the scene; and wherein developing the confidence index comprises traversing the path for a second time using the same current value of each attribute used when traversing the path for the first time in response to identifying the detected scene. 